<extend name='Public/base'/>

<block name='body'>
    <div class='main-tile'>
        <h2>投票情况</h2>
    </div>
    <div class='cf'>
        <!-- 按钮工具栏 -->
        <div class='f1'>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
        <!-- 高级搜索栏 -->
        <div class='search-form fr cf'>
            <div class="sleft">
                <input type="text" name="charge" class="search-input" value="{:I('title')}" placeholder="请输入微信昵称">
                <a class="sch-btn" href="javascript:;" id="search" url="{:U('Lord/voet')}"><i class="btn-search"></i></a>
            </div>
        </div>
        <div class='data-table'>
            <table class="">
                <thead>
                <tr>
                    <th>编号</th>
                    <th>微信头像</th>
                    <th>投票人昵称</th>
                    <th>投票次数</th>
                    <th>浏览次数</th>
                    <th>最后投票时间</th>
                </tr>
                </thead>
                <tbody>
                <volist name='list' id='vo' key="num">
                    <tr>
                        <td>{$num}</td>
                        <td><img src="{$vo.headimgurl}" height="30" width="30"></td>
                        <td>{$vo.nickname}</td>
                        <td>{$vo.voet_num}</td>
                        <td>{$vo.scan_num}</td>
                        <td>{$vo.time|time_format='Y-m-d'}</td>
                    </tr>
                </volist>
                </tbody>
            </table>
        </div>
    </div>
    <div class="page">
        {$_page}
    </div>
</block>
<block name="script">
    <link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
    <php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
    <script type="text/javascript">
        //搜索功能
        $("#search").click(function(){
            var url = $(this).attr('url');
            var query  = $('.search-form').find('input').serialize();
            query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
            query = query.replace(/^&/g,'');
            if( url.indexOf('?')>0 ){
                url += '&' + query;
            }else{
                url += '?' + query;
            }
            window.location.href = url;
        });
        /* 状态搜索子菜单 */
        $(".search-form").find(".drop-down").hover(function(){
            $("#sub-sch-menu").removeClass("hidden");
        },function(){
            $("#sub-sch-menu").addClass("hidden");
        });
        $("#sub-sch-menu li").find("a").each(function(){
            $(this).click(function(){
                var text = $(this).text();
                $("#sch-sort-txt").text(text).attr("data",$(this).attr("value"));
                $("#sub-sch-menu").addClass("hidden");
            })
        });
        //回车搜索
        $(".search-input").keyup(function(e){
            if(e.keyCode === 13){
                $("#search").click();
                return false;
            }
        });
        //导航高亮
        highlight_subnav('{:U('Lord/index')}');
    </script>
</block>
